import request from "@/utils/request-gis";

// ---------------------------------------------------管点-------------------------------------------------
class GisPointInfoAPI {
  // 新增
  static api_add(data: any) {
    return request({
      url: "/api/GisPointInfo/AddAsync",
      method: "post",
      data,
    });
  }

  // 删除
  static api_del(data: any) {
    return request({
      url: "/api/GisPointInfo/DeleteAsync",
      method: "post",
      data,
    });
  }

  // 批量删除
  static api_del_batch(data: any) {
    return request({
      url: "/api/GisPointInfo/BatchDeleteGisPointInfoAsync",
      method: "post",
      data,
    });
  }

  // 更新
  static api_update(data: any) {
    return request({
      url: "/api/GisPointInfo/UpdateAsync",
      method: "post",
      data,
    });
  }

  // 查询
  static api_query(data: any) {
    return request({
      url: "/api/GisPointInfo/QueryAsync",
      method: "post",
      data,
    });
  }

  // 查询 设备状态下列表信息
  static api_query_device_status_receivejson(data: any) {
    return request({
      url: "/api/GisPointInfo/QueryByDeviceStatusListAsync",
      method: "post",
      data,
    });
  }

  // 查询 管点
  static api_query_point(data: any) {
    return request({
      url: "/api/GisPointInfo/QueryGisPointGroupInfoAsync",
      method: "post",
      data,
    });
  }

  // 查询 管线
  static api_query_line(data: any) {
    return request({
      url: "/api/GisPointInfo/QueryGisLineGroupInfoAsync",
      method: "post",
      data,
    });
  }

  // 查询 设备状态分组统计信息
  static api_query_device_status(data: any) {
    return request({
      url: "/api/GisPointInfo/QueryByDeviceStatusAsync",
      method: "post",
      data,
    });
  }

  // 查询 区域内 管点
  static api_query_point_by_polygon(data: any) {
    return request({
      url: "/api/GisPointInfo/QueryJsonGeomAsync",
      method: "post",
      data,
    });
  }

  // 详情
  static api_detail(id: number) {
    return request({
      url: "/api/GisPointInfo/DetailsAsync?Id=" + id,
      method: "post",
    });
  }

  // 告警设置
  static api_alarm_set(data: any) {
    return request({
      url: "/api/GisPointInfo/AlarmSetAsync",
      method: "post",
      data,
    });
  }

  // 批量告警设置
  static api_batch_alarm_set(data: any) {
    return request({
      url: "/api/GisPointInfo/BatchAlarmSetAsync",
      method: "post",
      data,
    });
  }

  // 导入
  static api_import(formData: any) {
    return request({
      url: "/api/GisPointInfo/BatchImportPoints",
      method: "post",
      data: formData,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  }

  // 导出
  static api_export_query_async(data: any) {
    return request({
      url: "/api/GisPointInfo/ExportByClassIdQueryAsync",
      method: "post",
      data,
      responseType: "blob",
    });
  }

  // 导出
  static api_export_query_async_(data: any) {
    return request({
      url: "/api/GisPointInfo/ExportQueryAsync",
      method: "post",
      data,
      responseType: "blob",
    });
  }
}
export default GisPointInfoAPI;
